EvtHandler::DoCreateMenu
Section: ET++ method description (n)
Updated: automatically Fri Mar 15 14:09:27 1991
Index
Return to Main Contents
NAME
EvtHandler::DoCreateMenu - instance method
TEMPLATE
void DoCreateMenu(Menu * menu)
SPECIFIERS
public
virtual
DESCRIPTION
DoCreateMenu is called by the method VObject::DoRightButtonDownCommand once for each new popup menu before the menu is shown the first time.
Overriding DoCreateMenu gives the possibility to add new menu items or whole submenus to the menu. A typical implementation first calls the inherited method to allow the base classes and next handlers to add their menu items. Then this handler adds its own items as the following example shows:
void MyClass::DoCreateMenu (Menu *menu)
{
MyBaseClass::DoCreateMenu(menu);
menu->AppendItem ("menu command 1", cMENUCMD1);
menu->AppendItems ("-",
"menu command 2", cMENUCMD2,
NULL);
}
The default implementation forwards DoCreateMenu to the next handler.
See also class Menu, method GetMenu, method DoSetupMenu and method DoMenuCommand.
Method is often overridden.
ARGUMENTS
- Menu * menu
-
a new menu returned by the method GetMenu to be filled with menu items
RETURN ARGUMENT
void
CATEGORIES
menus, overrider interface
FIRST DEFINITION
class EvtHandler
FILES
- implementation:
-
EvtHandler.C
Index
- NAME
-
- TEMPLATE
-
- SPECIFIERS
-
- DESCRIPTION
-
- ARGUMENTS
-
- RETURN ARGUMENT
-
- CATEGORIES
-
- FIRST DEFINITION
-
- FILES
-
This document was created by
man2html,
using the manual pages.
Time: 00:40:27 GMT, March 30, 2022